/**
 * 
 */
package com.swg.cocobox.filetransfer.command;

import java.nio.channels.SocketChannel;

import com.swg.cocobox.EventSupport;

/**
 * @author satriaprayoga
 *
 */
public class CommandEventSupport extends EventSupport<CommandEvent, CommandEventListener>{

	private static final long serialVersionUID = -3225700664805522894L;

	public CommandEventSupport(Object source) {
		super(source);
	}

	@Override
	public CommandEvent fireEvent(SocketChannel channel) {
		return new CommandEvent(getSource(), channel);
	}
	
	public CommandEvent fireEvent(SocketChannel channel,Command command){
		CommandEvent event=fireEvent(channel);
		event.setCommand(command);
		return event;
	}

}
